export const http = function({
  url,
  data='',
  method='GET',
  header={}
}){
    return new Promise((resolve,reject)=>{
      wx.request({
        method,
        url:url+data,
        header,
        success:res=>{
          resolve(res)
        },
        fail:error=>{
          reject(error)
        }
      })
    })

}